<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<script type="text/javascript">
$(function(){
	var defauStartTime='${defauStartTime}';
	var defauEndTime='${defauEndTime}';
	
	   $('#utmcmdResetForm').click(function(){
		   $("#s_utmcsr").val("");
		   $("#s_utmcmd").val("");
		  $("#s_startTime").val(defauStartTime);
		  $("#s_endTime").val(defauEndTime);
		 
	    });
	   $('#dResetForm').click(function(){
		 
		 $(".textInput").val("");
	    });
	   $('#sResetForm').click(function(){
		 $(".textInput").val("");
	    });
	   $('#tsetForm').click(function(){
		 $(".textInput").val("");
	    });
	  });
</script>

<form id="pagerForm" method="post"
	action="${ctx}/statisticsDate/queryUtmcmd">
		
</form>

<form rel="pagerForm" onsubmit="return navTabSearch(this);">
        <input type="hidden" name="pageNum" value="${page.current}" />
    <input type="hidden" name="pageSize" value="${page.pageSize}" />
    <input type="hidden" name="numPerPage" value="${page.pageSize}" />
<input type="hidden" name="temp" value="true"/>
<input type="hidden" name="defauStartTime" value="${defauStartTime}"/>
<input type="hidden" name="defauEndTime" value="${defauEndTime}"/>
	<div class="pageHeader">
		<div class="searchBar">
			<table class="searchContent">
				<tbody>
					<tr>
						<td align="right">来源：</td>
						<td align="left"><input type="text" name="utmcsr" id="s_utmcsr"
							class="textInput" value="${utmcsr}">
						<td>
						<td align="right">媒介：</td>
						<td align="left"><input type="text" name="utmcmd" id="s_utmcmd"
							class="textInput" value="${utmcmd}">
						<td>
						<td align="center">日期：</td>
						<td align="left"><input type="text"
							class="date textInput readonly" readonly="true"
							dateFmt="yyyy-MM-dd" value="${startTime}" name="startTime" id="s_startTime">
							至 <input type="text" class="date textInput readonly" id="s_endTime"
							readonly="true" dateFmt="yyyy-MM-dd" value="${endTime}"
							name="endTime">
						<td>
					</tr>


				</tbody>

			</table>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive">
							<div class="buttonContent">
								<button id="but_submit"  class="sous">查询</button>
							</div>
						</div></li>
						<li><div class="buttonActive">
							<div class="buttonContent">
								<c:if test="${flag==1}">
								<button type="button" id="dResetForm">重置</button>
								
								</c:if>
								<c:if test="${flag==2}">
								<button type="button" id="sResetForm">重置</button>
								
								</c:if>
								<c:if test="${flag==3}">
								<button type="button" id="tsetForm">重置</button>
								
								</c:if>
									<c:if test="${empty flag}">
								<button type="button" id="utmcmdResetForm">重置</button>
								
								</c:if>
							</div>
						</div></li>
				</ul>
			</div>
		</div>
	</div>
</form>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li >
			<a class="icon" title="确实要导出这些记录吗?"
				href="${ctx}/statisticsDate/utmcmdExport" target="dwzExport"
				targettype="navTab"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="168">
		<thead>
			<tr>
				<th align="center">日期</th>
				<th align="center">来源</th>
				<th align="center">媒介</th>
				<th align="center">访问总数</th>
				<th align="center">咨询次数</th>

				<th align="center">模拟开户总数</th>
				<th align="center">真实开户总数</th>
				<th align="center">首次入金总数</th>


			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.data}" var="item">
				<tr target="sid" rel="${item.id}">

					<td>${item.formatDataTime}</td>
					<td>${item.utmcsr}</td>
					<td>${item.utmcmd}</td>
					<td>${item.visitCount}</td>
					<td>${item.advisoryCount}</td>
					<td><c:if test="${item.demoCount>0}">
							<a title="详细列表"  rel="nav_deount_page" fresh="true"
								href="${ctx}/statisticsDate/utmDetail?beginTimes=${item.formatDataTime}&utmcsrs=${item.utmcsr}&utmcmds=${item.utmcmd}&behaviorTypes=3"
								target="navTab"    style="color: #0082E4;">${item.demoCount}</a>
						</c:if> <c:if test="${item.demoCount==0}">
					${item.demoCount}
					</c:if></td>
					<td><c:if test="${item.realCount>0}">

							<a title="详细列表"rel="nav_realcunt_page"
								href="${ctx}/statisticsDate/utmDetail?beginTimes=${item.formatDataTime}&utmcsrs=${item.utmcsr}&utmcmds=${item.utmcmd}&behaviorTypes=4"
								target="navTab"style="color: #0082E4;">${item.realCount}</a>
						</c:if> <c:if test="${item.realCount==0}">
					
					${item.realCount}
					</c:if></td>
					<td><c:if test="${item.depositCount>0}">

							<a title="详细列表" rel="nav_depo_page" 
								href="${ctx}/statisticsDate/utmDetail?beginTimes=${item.formatDataTime}&utmcsrs=${item.utmcsr}&utmcmds=${item.utmcmd}&behaviorTypes=5"  
								target="navTab" style="color: #0082E4;">${item.depositCount}</a>
						</c:if> <c:if test="${item.depositCount==0}">
						${item.depositCount}
						</c:if></td>
				</tr>
			</c:forEach>

		</tbody>
	</table>
	<div class="panelBar1">
		<span><strong>总累计</strong></span><span>访问：${statisc.visitCount}</span><span>咨询：${statisc.advisoryCount}</span>
		<span>模拟开户：${statisc.demoCount}</span> <span>真实开户：${statisc.realCount}</span>
		<span>首次入金数：${statisc.depositCount}</span>
	</div>
    <%@include file="/WEB-INF/view/commons/paging.jsp"%>

</div>
